package com.zkingsoft.wechat;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.web.BaseAction;
import com.zkingsoft.dao.DataDictionaryDao;

/**
 * @description (数据字典)
 * @author 姜友瑶
 * @date 2018-07-10 07:52
 */
@Controller
@RequestMapping(value = "wxapi/datasDictionary")
public class DataDictionaryAction extends BaseAction {

	@Autowired
	DataDictionaryDao dataDictionaryDao;

	/**
	 * 根据类型查询数据字典中的值
	 */
	@RequestMapping(value = "/getItem/{type}")
	public @ResponseBody AjaxResult showList(@PathVariable String type) {
		return new AjaxResult(AjaxResult.STATUS_SUCCESS, dataDictionaryDao.selectByType(type));
	}

}